package com.shr.exam.zhxyk;

import java.util.Scanner;

public class Main2 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		int[] heightArray = new int[count] ;
		int sum = 0;
		for(int i = 0;i<count;i++){
			heightArray[i] = sc.nextInt();
			sum += heightArray[i];
		}
		int maxVal = getMax(heightArray, 0);
		if(maxVal > sum - maxVal)
			System.out.println("true");
		else System.out.println("false");
		sc.close();
		
	}

	private static int getMax(int[] heightArray, int i) {
		if(heightArray.length - i == 1)
			return heightArray[i] ;
		if(heightArray.length - i == 2)
			return (heightArray[i] + heightArray[i+1]) ;
		int maxVal1 = heightArray[i] + getMax(heightArray, i+1) ;
		int maxVal2 = heightArray[i] + heightArray[i+1] + getMax(heightArray, i+2);
		return maxVal1 > maxVal2 ? maxVal1 : maxVal2 ; 
	}
}
